function e = isemptycell(c)
% isemptycell  - returns a boolean array with isempty over cells
%
% FORMAT:       iec = isemptycell(c)
%
% Input fields:
%
%       c           cell array
%
% Output fields:
%
%       iec         input-sized boolean array with isempty(c{i,j,...})
%
% This is a MEX (c compiled) function for efficiency.

% Version:  v0.7g
% Build:    9100818
% Date:     Otc-08 2009, 6:22 PM CEST
% Author:   Jochen Weber, SCAN Unit, Columbia University, NYC, NY, USA
% URL/Info: http://wiki.brainvoyager.com/BVQXtools

% argument check
if nargin ~= 1 || ...
   ~iscell(c)
    error( ...
        'BVQXtools:BadArgument', ...
        'Bad or missing argument.' ...
    );
end

% create output
e = true(size(c));

% iterate
for cc = 1:numel(c)
    
    % set value
    e(cc) = isempty(c{cc});
end
